var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');

var Schema =mongoose.Schema;
const ObjectId = Schema.ObjectId;
var UserSchema=new Schema({
	title:String,
 	author:String,
	subheading:String,
	content:String,
	cateId:ObjectId,
	date:{type:Date,default:Date.now}
})
UserSchema.plugin(mongoosePaginate);
var User= mongoose.model('News',UserSchema,'news');
module.exports =User

 	